﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using XBoshi.SecurityCommon;

namespace XBoshiGFS.forms
{
    public partial class RegisterForm : Form
    {
        private LicenseClass lc;



        public RegisterForm(LicenseClass lc )
        {
            InitializeComponent();
            this.lc = lc;
            TBMachineCode.Text = lc.machinCode;
        }

        private void btnGenerate_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(textBox1.Text)) {
                return ;
            }

            //
            if (MessageBox.Show("确定进行使用所给注册码注册？","提示",MessageBoxButtons.YesNo ) == DialogResult.Yes) {
                MachineNumber.Regist(textBox1.Text);   
            }
            MessageBox.Show("程序需要关闭后，注册码才能生效！");
            this.Close();
        
        
        }

        private void RegisterForm_Load(object sender, EventArgs e)
        {

        }
    }
}
